home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "create odd masks."
- ClientHeight = 6015
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 8055
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 6015
- ScaleWidth = 8055
- StartUpPosition = 2 'CenterScreen
- Begin VB.Frame Frame1
- Caption = "Angle Setup:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 1095
- Left = 0
- TabIndex = 1
- Top = 4920
- Width = 8055
- Begin VB.CommandButton Command1
- Height = 495
- Left = 7080
- Picture = "Form1.frx":0000
- Style = 1 'Graphical
- TabIndex = 11
- Top = 360
- Width = 735
- End
- Begin VB.TextBox Text8
- BeginProperty Font
- Name = "Tahoma"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 6240
- TabIndex = 10
- Text = "20"
- Top = 480
- Width = 615
- End
- Begin VB.TextBox Text7
- BeginProperty Font
- Name = "Tahoma"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 5520
- TabIndex = 9
- Text = "10"
- Top = 480
- Width = 615
- End
- Begin VB.TextBox Text6
- BeginProperty Font
- Name = "Tahoma"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 4440
- TabIndex = 8
- Text = "10"
- Top = 480
- Width = 615
- End
- Begin VB.TextBox Text5
- BeginProperty Font
- Name = "Tahoma"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 3720
- TabIndex = 7
- Text = "300"
- Top = 480
- Width = 615
- End
- Begin VB.TextBox Text4
- BeginProperty Font
- Name = "Tahoma"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 2640
- TabIndex = 6
- Text = "450"
- Top = 480
- Width = 615
- End
- Begin VB.TextBox Text3
- BeginProperty Font
- Name = "Tahoma"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 1920
- TabIndex = 5
- Text = "45"
- Top = 480
- Width = 615
- End
- Begin VB.TextBox Text2
- BeginProperty Font
- Name = "Tahoma"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 840
- TabIndex = 4
- Text = "566"
- Top = 480
- Width = 615
- End
- Begin VB.TextBox Text1
- BeginProperty Font
- Name = "Tahoma"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 120
- TabIndex = 3
- Text = "1"
- Top = 480
- Width = 615
- End
- Begin VB.Label Label1
- Caption = "Vertices:"
- BeginProperty Font
- Name = "Tahoma"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 2
- Top = 240
- Width = 1095
- End
- End
- Begin VB.PictureBox Picture1
- BeginProperty Font
- Name = "Tahoma"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 4815
- Left = 0
- Picture = "Form1.frx":27A2
- ScaleHeight = 4755
- ScaleWidth = 7995
- TabIndex = 0
- Top = 0
- Width = 8055
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Dim vertex(0 To 3) As POINT_TYPE
- Dim hRgn As Long
- Dim retval As Long
- 'build the array for the angles from user input
- vertex(0).x = Val(Text1): vertex(0).y = Val(Text2)
- vertex(1).x = Val(Text3): vertex(1).y = Val(Text4)
- vertex(2).x = Val(Text5): vertex(2).y = Val(Text6)
- vertex(3).x = Val(Text7): vertex(3).y = Val(Text8)
- 'create the polygon
- hRgn = CreatePolygonRgn(vertex(0), 4, ALTERNATE)
- 'set the mask
- retval = SetWindowRgn(Picture1.hWnd, hRgn, True)
- 'delete the unneeded region
- retval = DeleteObject(hRgn)
- End Sub
-